/**
 * @功能描述: 模态对话框
 * @author: lzn
 * @date: 2022-09-30 10:59:09
 * @version: 1.0
 */
<script setup>
import { ref } from 'vue';
const visible = ref(false);
</script>

<template>
  <button class="yw-btn" @click="visible = true">modalAlert</button>
  <div class="yw-modal" v-if="visible">
    <div class="yw-modal-mask"></div>
    <div class="yw-modal-content">
      <div>modal-content</div>
      <button class="yw-btn" @click="visible = false">close</button>
    </div>
  </div>
</template>

<style scoped>
.yw-modal-content {
  width: 500px;
}
</style>